| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

PixelFormat.h
1 // PixelFormat.h
3 //
5
6 namespace nkImages
7 {
15 enum class PIXEL_FORMAT
16 {
17 UNKNOWN_FORMAT = 0,
18 R8,
19 R8A8,
20 R8G8B8,
21 R8G8B8A8,
22 B8G8R8,
23 B8G8R8A8,
24 R16G16B16A16,
25 R32G32B32,
26 R32G32B32A32,
27 Y8U8V8_444,
28 Y8U8Y8V8_422,
29 Y8U8V8_420_SP,
30 Y8Y8U8Y8Y8V8_411,
31 BC1,
32 BC2,
33 BC3,
34 BC4,
35 BC5
36 } ;
37
41 class PixelFormatUtils final
42 {
43 public :
44
45 // Conversions
52 static PIXEL_FORMAT getRgbFromBgrFormat (PIXEL_FORMAT format) ;
59 static PIXEL_FORMAT getEquivalentAlphaFormat (PIXEL_FORMAT format) ;
66 static PIXEL_FORMAT getEquivalentNoAlphaFormat (PIXEL_FORMAT format) ;
73 static unsigned int getFormatByteSize (PIXEL_FORMAT format) ;
80 static unsigned int getFormatCompressionRatioWidth (PIXEL_FORMAT format) ;
87 static unsigned int getFormatCompressionRatioHeight (PIXEL_FORMAT format) ;
96 static bool isFormatCompressed (PIXEL_FORMAT format) ;
103 static bool isFormatFloatingPoint (PIXEL_FORMAT format) ;
110 static bool hasAlpha (PIXEL_FORMAT format) ;
111 } ;
112 }
nkImages::PixelFormatUtils
Utility class to translate enum values into linked useful data.
Definition: PixelFormat.h:42
nkImages::PIXEL_FORMAT::R32G32B32
@ R32G32B32
Format is 3 channels Red Green Blue, each occupying 32 bits (4 bytes), floats.
nkImages::PIXEL_FORMAT::R8G8B8A8
@ R8G8B8A8
Format is 4 channels Red Green Blue Alpha, each occupying 8 bits (1 byte).
nkImages::PIXEL_FORMAT::R8
@ R8
Format is 1 channel Red, occupying 8 bits (1 byte).
nkImages::PIXEL_FORMAT::B8G8R8A8
@ B8G8R8A8
Format is 4 channels Blue Green Red Alpha, each occupying 8 bits (1 byte).
nkImages::PixelFormatUtils::getEquivalentAlphaFormat
static PIXEL_FORMAT getEquivalentAlphaFormat(PIXEL_FORMAT format)
nkImages::PIXEL_FORMAT::BC3
@ BC3
Block Compression 3 format, encoding 4x4 pixels (RGBA) in 16 bytes.
nkImages::PIXEL_FORMAT::R16G16B16A16
@ R16G16B16A16
Format is 4 channels Red Green Blue Alpha, each occupying 16 bits (2 bytes), half floats.
nkImages::PixelFormatUtils::isFormatFloatingPoint
static bool isFormatFloatingPoint(PIXEL_FORMAT format)
nkImages::PIXEL_FORMAT::UNKNOWN_FORMAT
@ UNKNOWN_FORMAT
Format is unknown or not supported.
nkImages::PIXEL_FORMAT::BC2
@ BC2
Block Compression 2 format, encoding 4x4 pixels (RGBA) in 16 bytes.
nkImages::PIXEL_FORMAT::Y8U8Y8V8_422
@ Y8U8Y8V8_422
YUV format (luminance and chrominance), each channel on 8 bits (1 byte). Internal storage order is YU...
nkImages::PIXEL_FORMAT::BC4
@ BC4
Block Compression 4 format, encoding 4x4 pixels (R) in 8 bytes.
nkImages::PIXEL_FORMAT::R8G8B8
@ R8G8B8
Format is 3 channels Red Green Blue, each occupying 8 bits (1 byte).
nkImages::PixelFormatUtils::getFormatByteSize
static unsigned int getFormatByteSize(PIXEL_FORMAT format)
nkImages::PIXEL_FORMAT::B8G8R8
@ B8G8R8
Format is 3 channels Blue Green Red, each occupying 8 bits (1 byte).
nkImages::PIXEL_FORMAT::R8A8
@ R8A8
Format is 2 channels Red Alpha, each occupying 8 bits (1 byte).
nkImages
Encompasses all API of component NilkinsImages.
Definition: BmpEncoder.h:7
nkImages::PIXEL_FORMAT::Y8U8V8_444
@ Y8U8V8_444
YUV format (luminance and chrominance), each channel on 8 bits (1 byte). Internal storage order is YU...
nkImages::PIXEL_FORMAT
PIXEL_FORMAT
Lists formats for pixels.
Definition: PixelFormat.h:16
nkImages::PixelFormatUtils::isFormatCompressed
static bool isFormatCompressed(PIXEL_FORMAT format)
nkImages::PIXEL_FORMAT::BC1
@ BC1
Block Compression 1 format, encoding 4x4 pixels (RGBA) in 8 bytes.
nkImages::PixelFormatUtils::getFormatCompressionRatioHeight
static unsigned int getFormatCompressionRatioHeight(PIXEL_FORMAT format)
nkImages::PixelFormatUtils::hasAlpha
static bool hasAlpha(PIXEL_FORMAT format)
nkImages::PIXEL_FORMAT::BC5
@ BC5
Block Compression 5 format, encoding 4x4 pixels (RG) in 16 bytes.
nkImages::PixelFormatUtils::getEquivalentNoAlphaFormat
static PIXEL_FORMAT getEquivalentNoAlphaFormat(PIXEL_FORMAT format)
nkImages::PIXEL_FORMAT::Y8U8V8_420_SP
@ Y8U8V8_420_SP
YUV format (luminance and chrominance), each channel on 8 bits (1 byte). Internal storage is semi pla...
nkImages::PixelFormatUtils::getFormatCompressionRatioWidth
static unsigned int getFormatCompressionRatioWidth(PIXEL_FORMAT format)
nkImages::PIXEL_FORMAT::R32G32B32A32
@ R32G32B32A32
Format is 4 channels Red Green Blue Alpha, each occupying 32 bits (4 bytes), floats.
nkImages::PixelFormatUtils::getRgbFromBgrFormat
static PIXEL_FORMAT getRgbFromBgrFormat(PIXEL_FORMAT format)
nkImages::PIXEL_FORMAT::Y8Y8U8Y8Y8V8_411
@ Y8Y8U8Y8Y8V8_411
YUV format (luminance and chrominance), each channel on 8 bits (1 byte). Internal storage order is YY...